package chapter3;

public class NarrowConversion {
    public static void main(String[] args) {
        //强制类型转换，导致溢出和精度丢失
        int iValue = 233;
        //强转为byte类型，发生溢出
        byte bValue = (byte) iValue;
        System.out.println(bValue);
        double dValue = 3.98;
        //强转为int类型，丢失了小数部分
        int tol = (int) dValue;
        System.out.println(tol);
    }
}
